from sqlalchemy import Column, Integer, String, DateTime, Boolean
from sqlalchemy.sql import func
from app.core.database import Base
from passlib.hash import bcrypt

# class User(Base):
#     __tablename__ = "users"
#
#     id = Column(Integer, primary_key=True, index=True)
#     username = Column(String(50), unique=True, index=True, nullable=False)
#     email = Column(String(100), unique=True, index=True, nullable=False)
#     hashed_password = Column(String(100), nullable=False)
#     is_active = Column(Boolean, default=True)
#     is_admin = Column(Boolean, default=False)
#     created_at = Column(DateTime(timezone=True), server_default=func.now())
#     updated_at = Column(DateTime(timezone=True), onupdate=func.now())
#
#     def verify_password(self, password: str) -> bool:
#         return bcrypt.verify(password, self.hashed_password)
#
#     @staticmethod
#     def get_password_hash(password: str) -> str:
#         return bcrypt.hash(password)